package me.project.android_common.domain;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

@Data
@EqualsAndHashCode(callSuper = false)
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("mk_datatype")
public class DataType extends Model<DataType> {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    private String name;

    @TableField(exist = false)
    private Set<DataPoint> dataPoints = new HashSet<>();

    @Override
    protected Serializable pkVal() {
        return this.id;
    }


}
